package com.pzh.usercenter.model.enums;

/**
 * 队伍状态枚举
 */
public enum TeamStatusEnum {

    PUBLIC(0,"公开"),

    PRIVATE(1,"私有"),

    ENCRYPT(2,"加密");

    private int status;

    private String message;

    /**
     * 通过状态获取枚举值
     * @param value
     * @return
     */
    public static TeamStatusEnum getEnumByValue(Integer value) {
        if(value == null){
            return null;
        }
        TeamStatusEnum[] enums = TeamStatusEnum.values();
        for(TeamStatusEnum e : enums){
            if(e.status == value){
                return e;
            }
        }
        return null;
    }

    TeamStatusEnum(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
